package com.vogue.supplymall.entmanagement.controller;

import javax.annotation.Resource;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.vogue.supplymall.entmanagement.domain.service.LicenceScopeOfBusinessService;
import com.vogue.supplymall.common.domain.dto.ControllerResultInfo;

/**
 * 经营范围查询接口
 * 
 * @author 崔岳
 *
 */
@Validated
@RestController
public class LicenceScopeOfBusinessController extends BaseController {

	@Resource
	private LicenceScopeOfBusinessService licenceScopeOfBusinessService;

	/**
	 * 获取经营范围
	 * 
	 * @param appver
	 * @return
	 */
	@RequestMapping(value = "/is/{appver}/entmanagement/licencescopeofbusiness", method = RequestMethod.POST)
	public ResponseEntity<Object> findCurrentShopList(@PathVariable("appver") String appver) {
		
		ControllerResultInfo resultInfo = new ControllerResultInfo();
		resultInfo.setResult(true);
		resultInfo.setData(licenceScopeOfBusinessService.allScopeOfBusiness());
		return new ResponseEntity<>(resultInfo, HttpStatus.OK);
		
	}
}
